package core
{

	/**
	 * 游戏中数据对象
	 * @author hyy
	 *
	 */
	public class GameData
	{
		public function GameData()
		{
		}

		public function readProperty(property : String, value : *) : void
		{
			if(property == "")
				return;

			if(this.hasOwnProperty(property))
			{
				if(this[property] is int)
				{
					this[property] = int(value);
				}
				else if(this[property] is Number)
				{
					this[property] = Number(value);
				}
				else if(this[property] is Boolean)
				{
					this[property] = Boolean(int(value));
				}
				else if(this[property] is Vector.<int>)
				{
					(this[property] as Vector.<int>).push(int(value));
				}
				else if(this[property] is Vector.<String>)
				{
					(this[property] as Vector.<String>).push(String(value));
				}
				else if(this[property] is Array)
				{
					(this[property] as Array).push(String(value));
				}
				else
				{
					this[property] = value;
				}
			}
		}

		public function checkData() : void
		{
			
		}
	}
}